package com.school.admin.common.aop;


import com.school.admin.common.utils.Db;
import com.school.admin.entity.SysOperateLog;
import com.school.admin.mapper.SysOperateLogMapper;

/**
 * @author :sunpx
 * @date :created in 2020/7/2 10:06
 * @desc :日志异步
 */
public class LogThread implements Runnable {

    SysOperateLog sysOperateLog;


    public LogThread(SysOperateLog sysOperateLog) {
        this.sysOperateLog = sysOperateLog;
    }

    @Override
    public void run() {
        SysOperateLogMapper mapper = Db.getMapper(SysOperateLogMapper.class);
        mapper.insert(sysOperateLog);
    }
}
